/*
 * Copyright (C) 2018 guomw.Inc. All rights reserved.
 * 项目名称： report-manage
 * 文件名称： SystemMenu.java
 * Date：18-11-5 上午10:54
 * Author: guomw
 */

package com.guomw.report.service.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.guomw.report.common.config.Constant;
import lombok.Data;

import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * 系统菜单
 * @author guomw
 * @date 2018/9/14
 */
@Entity
@Data
@Table(name = "bxs_sys_menus")
public class SystemMenu {

    /**
     * 菜单code，主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "item_code")
    private Integer itemCode;

    /**
     * 菜单名称
     */
    @Column(name = "item_name",length = 100)
    private String itemName;

    /**
     * 菜单父级code
     */
    @Column(name = "item_parent_code")
    private Integer itemParentCode;
    /**
     * 排序
     */
    @Column(name = "item_sort")
    private int itemSort;

    /**
     * 菜单路径
     */
    @Column(name = "item_path")
    private  String itemPath;
    /**
     * 是否启用
     */
    @Column(name = "item_enable")
    private boolean itemEnable;

    /**
     * 是否是功能菜单
     */
    @Column(name = "item_function")
    private boolean itemFunction;

  /**
     * 菜单图标fa样式
     */
    @Column(name = "item_icon_cls")
    private  String itemIconCls;

    /**
     * 当前菜单深度
     */
    @Column(name = "item_depth")
    private Integer itemDepth;

    /**
     * 下级菜单节点数
     */
    @Column(name = "item_child_count")
    private Long itemChildCount;
    /**
     * 备注
     */
    @Column(name = "item_remark")
    private String itemRemark;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = Constant.DATETIME_FORMAT)
    @Column(name = "create_time",columnDefinition = "datetime")
    private LocalDateTime createTime;

}
